package com.cbw.firegame.member.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableTransactionManagement
@MapperScan("com.cbw.firegame.member.dao")
public class MybatiesConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
//        当超过最大页数是否跳转到底一页
        paginationInterceptor.setOverflow(true);
        //限制记录条数
        paginationInterceptor.setLimit(1000);
        return   paginationInterceptor;
    }
}
